<!DOCTYPE html>
{% load staticfiles %}
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="{% static 'js/jquery-weui.min.js' %}"></script>
<script src="{% static 'js/mui.min.js' %}"></script>
<script src="{% static 'js/clipboard.js' %}"></script>
<script src="{% static 'js/mui.picker.min.js' %}"></script>

    <script src="{% static 'js/hm.js' %}"></script>
    <script src="{% static 'js/jquery-min.js' %}"></script>
    <link href="{% static 'css/mui.min.css' %}" rel="stylesheet">
    <link href="{% static 'css/mui.picker.css' %}" rel="stylesheet">
    <link href="{% static 'css/mui.poppicker.css' %}" rel="stylesheet">
    <link href="{% static 'css/weui.min.css' %}" rel="stylesheet">
    <link href="{% static 'css/jquery-weui.min.css' %}" rel="stylesheet">
    <link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
    <link href="{% static 'css/layui.css' %}" rel="stylesheet">
    <script src="{% static 'js/layui.js' %}"></script>
    <script src="{% static 'js/jquery.cookie.js' %}"></script>
</head>
<body>
    {% for yuechang in yuechanges1 %}
        <div><p><span class="red">注册</span> </p></div>
    <input id="typevaluenow" style="font-size: 15px" type="text" class="mui-input-clear " value="{{ yuechang.user.id }}" data-input-clear="2">
    <input id="typevaluenow" style="font-size: 15px" type="text" class="mui-input-clear " value="{{ yuechang.user.qianbao }}" data-input-clear="2">
    <input id="typevaluenow" style="font-size: 15px" type="text" class="mui-input-clear " value="{{ yuechang.change_jine }}" data-input-clear="2">

    <input id="typevaluenow" style="font-size: 15px" type="text" class="mui-input-clear " value="{{ yuechang.change_time }}" data-input-clear="2">
    <button id="sellnow" class="mui-btn mui-btn-danger" style="width: 100%" onclick="weishi({{ yuechang.id }})">确定已经注册</button>
        {% endfor %}


    {% for yuechang in yuechanges %}
        <div><p><span class="red">充值</span> </p></div>
    <input id="typevaluenow" style="font-size: 15px" type="text" class="mui-input-clear " value="{{ yuechang.user.id }}" data-input-clear="2">
    <input id="typevaluenow" style="font-size: 15px" type="text" class="mui-input-clear " value="{{ yuechang.user.qianbao }}" data-input-clear="2">
    <input id="typevaluenow" style="font-size: 15px" type="text" class="mui-input-clear " value="{{ yuechang.change_jine }}" data-input-clear="2">

    <input id="typevaluenow" style="font-size: 15px" type="text" class="mui-input-clear " value="{{ yuechang.change_time }}" data-input-clear="2">
    <button id="sellnow" class="mui-btn mui-btn-danger" style="width: 100%" onclick="weishi({{ yuechang.id }})">确定已经充值</button>




    {% endfor %}
{% for yuechang in yuechanges2 %}
        <div><p><span class="red">提现</span> </p></div>
           <input id="typevaluenow" style="font-size: 15px" type="text" class="mui-input-clear " value="{{ yuechang.user.id }}" data-input-clear="2">
    <input id="typevaluenow" style="font-size: 15px" type="text" class="mui-input-clear " value="{{ yuechang.user.qianbao }}" data-input-clear="2">
    <input id="typevaluenow" style="font-size: 15px" type="text" class="mui-input-clear " value="{{ yuechang.change_jine }}" data-input-clear="2">

    <input id="typevaluenow" style="font-size: 15px" type="text" class="mui-input-clear " value="{{ yuechang.change_time }}" data-input-clear="2">
    <button id="sellnow" class="mui-btn mui-btn-danger" style="width: 100%" onclick="weishi({{ yuechang.id }})">确定已经喂食</button>

{% endfor %}




<script>


        function weishi(id){


        mui.confirm('确定完成交易？','提示',['取消','确定'],function(data){
            if(data.index == 1){


        $.ajaxSetup({
                data:{csrfmiddlewaretoken:'{{ csrf_token }}'},
             });
            $.post("{% url 'houtai' %}", {id: id}, function (data) {

            if (data.code == 1) {
                mui.toast(data.msg);
                window.location.reload();

            }
        });
            }
        });
        }
        </script>
</body>
</html>